home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / print / proff.zip / PROFFMAN.PRF < prev    next >
Text File  |  1988-02-13  |  48KB  |  1,567 lines

  1.  
  2. .! Proff user's manual
  3. .! Feb. 1984 by Ozan S. Yigit
  4. .!
  5. .! Edited by Steven Tress and Terry Lim
  6. .! vers. 1.0
  7. .!
  8. .! ----------- macros ----------
  9. .! sect - produce a bold section header and
  10. .! enter a contents line. First parameter
  11. .! is indent level for contents line.
  12. .define sect
  13. .sp
  14. .cl $1 $2 $3 $4 $5 $6 $7
  15. .bd
  16. $2 $3 $4 $5 $6 $7
  17. .en
  18. .! -----------------------------
  19. .define note
  20. .sp
  21. .ce
  22. NOTE
  23. .sp
  24. .fi
  25. .in +5
  26. .rm -5
  27. .en
  28. .define endnote
  29. .sp
  30. .nf
  31. .in -5
  32. .rm +5
  33. .en
  34. .! -----------------------------
  35. .! Macros to create a point-form lists. 
  36. .! Note the use of number registers within
  37. .! the macros. See section 5.
  38. .!              
  39. .define list
  40. .nr a $1
  41. .in +$1
  42. .en
  43.  
  44. .define item
  45. .sp
  46. .ti -@na
  47. $1
  48. .en
  49.  
  50. .define nolist
  51. .in -@na
  52. .sp
  53. .en
  54. .! -----------------------------
  55. .ce 100
  56. .st 8
  57. PROFF User's Guide
  58. .sp
  59. Version 1.0
  60. .ce 0
  61. .nf
  62. .in +25
  63. .sp 15
  64. ***  *******
  65. ***  *********
  66.      **         **
  67.      **         **
  68.      *********
  69.      *******
  70.      **
  71.      **
  72.      **
  73. ******
  74. ****
  75. .in -25
  76. .fi
  77. .ce 100
  78. .st -8
  79. Ozan S. Yigit & Steven Tress
  80. March 1984
  81. .ce 0
  82. .bp 1
  83. .he /1.0/Proff User's Guide/#/
  84. .ap
  85. .fi
  86. .ju
  87. .sect 0 1.0 Introduction
  88.  This manual describes PROFF, a formatter based on the FORMAT utility
  89. presented in
  90. .ul
  91. Software Tools.
  92.  PROFF was produced to provide a powerful formatter that can be used under
  93. a variety of microcomputers, thus providing a consistent formatting tool
  94. across environments. PROFF can be used to format memos, reports, form letters 
  95. and
  96. documents such as this manual. It can also be configured to mimic 
  97. other formatting
  98. systems of similar nature.
  99.  This document itself was produced with PROFF, using most of its advanced features.
  100. PROFF took care of such things as auto-paragraphing and the production of 
  101. the Table of Contents as the manual was being formatted.
  102.  PROFF was developed under a Digital Equipment Corporation Rainbow 100,
  103. using Mark Williams C Compiler for portability reasons. PROFF is
  104. available under VAX/VMS operating system. PROFF implementations for 
  105. IBM PC and APPLE ][ microcomputers are also underway.
  106. .st -14
  107. Rainbow, VAX/VMS are trademarks of Digital Equipment Corporation.
  108. .br
  109. Mark Williams C Compiler is a trademark of Mark Williams Company.
  110. .br
  111. IBM is a registered trademark of International Business Machines Inc.
  112. .br
  113. APPLE is a trademark of Apple Computer Inc.
  114. .br
  115. UNIX is a trademark of Bell Laboratories.
  116. .bp
  117. .cl
  118. .sect 0 2.0 General Description
  119. .cl
  120. .sect 1 2.1 The Input
  121.  The text that is to be formatted by PROFF is typed into an input file
  122. using any text editor. This file contains the text to be formatted
  123. as well as PROFF commands.
  124.  Each line in the input file is either a command line or a text line. A
  125. command line is a line that begins with a period ("."). All other lines are
  126. text lines. The command lines are not printed - they tell PROFF how you want
  127. it to format the text that follows. Appendix A summarizes all of the PROFF
  128. commands for a quick reference.
  129. .sect 2 2.1.1 Text
  130.  Text can be entered into the input file in any format. PROFF removes all extra
  131. blanks and tabs between words when operating in fill mode. This means you do
  132. not have to worry about how many words you put on a line, and you can break 
  133. lines wherever it is convenient to your typing. Note however, that you cannot
  134. break a word between two lines.
  135.  Blanks and tabs at the beginning of a line are not removed. This is useful
  136. for producing special tables and performing special types of indentation.
  137. Thus, normal text lines should not have any leading tabs or blanks.
  138. .sect 2 2.1.2 Commands
  139.  A command is a line that starts with a period. Immediately following the
  140. period is a command name. Some commands accept a numeric quantity or a
  141. character string parameter, which must be separated from the command name
  142. by a space or a comma. For example, an indent command might appear as follows:
  143. .save
  144. .in +5
  145. .nf
  146. .nj
  147. .sp
  148. |
  149. |It is to do nothing that the elect exists.
  150. |.in 5
  151. |- Oscar Wilde
  152. |
  153. .restore
  154.  Assuming that the left margin was at column 1, PROFF would produce the
  155. following:
  156. .save
  157. .in +5
  158. .nf
  159. .nj
  160. .sp
  161. .need 4
  162. |
  163. |It is to do nothing that the elect exists.
  164. |     - Oscar Wilde
  165. |
  166. .restore
  167. .sp
  168. (In the examples above, as in those following, the vertical line indicates
  169. the left edge of input or the left edge of the printed page).
  170.  The number following the command may be preceeded by a "+" or "-" sign.
  171. This plus or minus sign indicates an addition or subtraction of the number
  172. to or from the current value for the command. for example, the text:
  173. .sp
  174. .save
  175. .in +5
  176. .nf
  177. .nj
  178. .need 11
  179. |
  180. |Nothing to do but work,
  181. |.in +3
  182. |Nothing to eat but food,
  183. |.in -3
  184. |Nothing to wear but clothes
  185. |.in +3
  186. |To keep one from going nude.
  187. |.in +7
  188. |-Benjamin King
  189. |
  190. .in -5
  191. .sp
  192. will produce as output:
  193. .sp
  194. .in +5
  195. .need 6
  196. |
  197. |Nothing to do but work,
  198. |   Nothing to eat but food,
  199. |Nothing to wear but clothes
  200. |   To keep one from going nude.
  201. |          -Benjamin King
  202. |
  203. .restore
  204.  If a number is not supplied with a command that requires a number, PROFF
  205. will use a default value. The defaults for each command are summarized in
  206. Appendix A.
  207. .cl
  208. .sect 1 2.2 The Output
  209.  The main functions performed by PROFF are 
  210. .ul
  211. filling
  212. and 
  213. .ul
  214. justifying.
  215. A line is
  216. filled by packing as many words onto it as will fit. The line is justified
  217. by spacing words evenly between the left and right margins. When PROFF starts,
  218. it assumes that the text is to be filled and justified. Of course, when fill
  219. and justify are not needed (as in the case of a letter or a table), there are
  220. commands to turn these features off, and back on again, as necessary.
  221.  When PROFF is in fill mode, it normally strips out extra spaces and tabs 
  222. between words.
  223.  Many PROFF commands cause a
  224. .ul
  225. break
  226. to occur in the output. This means that the line currently being filled is 
  227. immediately output. Any following text goes into a new output line.
  228. .cl
  229. .sect 1 2.3 Executing PROFF
  230.  Once a text file is ready for formatting, PROFF is started by typing
  231. the program name, various options, name of the input file and the name
  232. of the output file. For example the command
  233. .sp
  234. .in +5
  235. A> proff  -po5 proffman.prf proff.man
  236. .sp
  237. .in -5
  238. would produce this document as proff.man, from an input file proffman.prf, 
  239. shifted right by 5 spaces.
  240. (The symbol "A>" is CP/M system prompt).
  241. .cl
  242. .sect 1 2.4 Bibliographic Notes
  243.   PROFF was produced by re-writing the Software Tools Formatter FORMAT.
  244. Some of the ideas are from Freshwater Institute RUNOFF, NROFF, 
  245. University of Waterloo SCRIPT
  246. and other formatters of similar nature. The underlying ideas of the
  247. mentioned above formatters may be found in
  248. .ul
  249. Software Tools
  250. by B.W. Kernighan and P.J. Plauger. 1976. (Addison-Wesley, Reading, Mass.).
  251. .cl
  252. .sect 1 2.5 References and Readings
  253. .nf
  254. .nap
  255. .sp
  256. Brian W. Kernighan and P. J. Plauger,
  257. .ul
  258. Software Tools
  259. Addison-Wesley (1976)
  260. .sp
  261. R. Furuta, J. Scofield and A. Shaw,
  262. .ul
  263. Document Formatting Systems:
  264. .ul
  265. Survey, Concepts, and issues
  266. ACM Computing Surveys, Sept. 1982, Pp. 417
  267. .sp
  268. Mark Stuart Brader,
  269. .ul
  270. An Incremental Text Formatter
  271. Department of Computer Science
  272. University of Waterloo, CS-81-12
  273. .bp
  274. .fi
  275. .ap
  276. .cl
  277. .sect 0 3.0 Command Descriptions
  278.  This section describes PROFF commands. Commands specify how the program is
  279. to process the text lines in the input file. Lines in the input file that
  280. begin with a period (or the control character selected by the user) 
  281. immediately followed by a command name are commands. Any line that begins
  282. with a period and followed by a _# or _! is a comment line and is ignored
  283. by PROFF - this allows you to put information in the file that will be neither
  284. processed nor output by PROFF.
  285.  As described earlier, some of the commands can be followed by "parameters".
  286. Parameters are used in executing a command; for example, in the command
  287. ".sp 3", the parameter "3" tells the formatter to insert 3 blank lines into
  288. the document. The following conventions are used in describing the parameters:
  289. .sp
  290. .in +5
  291. .ti -2
  292. o Parameters surrounded by square b